<?php
namespace app\index\model;

use think\Model;

class Brand extends  Model
{
    protected $table="ecm_brand";

    public function searchKeywordsAttr($q,$v)
    {
        $q->where('brand_name','like',"%{$v}%");
    }
    public static function getone($where)
    {

        $sql = Brand::
        withSearch(array_keys($where),$where)
        ->paginate([
            'list_rows' => 5,
            'query'=>$where
        ]);
        return $sql;
    }

}